package huiwen;

/**
 *
 */
public class Demo {

    public boolean isHuiWei(String s){
        if(s.length()==1) return true;
        int left=0;
        int right=s.length()-1;
        while(left<right){
            if(s.charAt(left)!=s.charAt(right)){
                return false;
            }
            left++;
            right--;
        }
        return true;
    }

    public static void main(String[] args) {

    }
}
